ux: usability pass — 3 fixes from Nielsen heuristics + Don't Make Me Think#91
Merged
Conversation
In the browser front-end the player could only act by clicking; the console and pygame front-ends both accept number keys to choose an option. A returning player who expects to press "1" to fish got no response, and pressing Enter to dismiss a dialogue did nothing — the web UI silently broke a convention the rest of the game establishes (Nielsen #7 flexibility and efficiency of use; Krug: conventions over invention). This binds number keys (1-9) to option selection and Enter/Space to advancing a dialogue or the timed fishing prompt, while leaving the text-entry field to handle its own keys. A live `currentScreen` reference drives the handler and is cleared on submit so a stray keypress can't double-submit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Every option rendered as the same neutral-blue button, so "Delete a Save File" and the "Yes, delete it" confirmation looked exactly like "Sell Fish" or "Load Slot 1". Deleting a save is irreversible, and giving an irreversible action the same affordance as benign ones invites a mis-click (Nielsen #5 error prevention; Nielsen #4 consistency and standards / Krug conventions — destructive actions conventionally read as red). Options whose label mentions "delete" now render with a red danger style, so the deletion path and its confirmation stand out from ordinary choices on the way to an unrecoverable action. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
If the game process stopped (a crash, or the window/terminal closed) the client kept polling /state in a swallowed try/catch and just sat on the last screen forever. To the player the game looked frozen with no hint that anything was wrong or that they should restart it (Nielsen #1 visibility of system status; Nielsen #9 help users recognize and recover from errors). After a few consecutive failed polls the client now shows a "Lost connection — is it still running?" banner and keeps retrying, clearing it automatically if the server comes back. The intentional "game ended" screen is left untouched so a clean quit doesn't get an alarming banner. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Nielsen/Krug usability pass on the web front-end (
src/ui/webUserInterface.py— the served HTML/JS client). Every commit is one self-contained, heuristic-cited fix, scoped small for easy review.Round 1 — feedback, control & convention on the web client
Test plan
1–9in a menu (e.g. the docks) selects that option without clicking;Enter/Spacedismisses a dialogue and triggers the fishing "React!".python3 -m pytest— 198 passed; client JS passesnode --check.🤖 Generated with Claude Code